/**
 * refer:https://mp.weixin.qq.com/s/5sulTLWLQ0s7xwRVHlRV2Q
 */
import { Modal, Button } from "antd";
import { FC } from "react";
interface AntdModalProps {}
const AntdModal: FC<AntdModalProps> = () => {
  const onButtonC = async () => {
    const confirmed = await new Promise((resolve, _) => {
      Modal.confirm({
        content: "代理用户是否删除?",
        cancelText: "取消",
        onCancel: () => {
          resolve(false);
        },
        onOk: () => {
          resolve(true);
        },
      });
    });
    console.log(confirmed);
  };
  return <Button onClick={onButtonC}></Button>;
};
export default AntdModal;
